<template>
  <div>
    <!-- 动画 ，过渡效果
    也就是css动画，渐变，淡入淡出等动画
    -->
    <div>
      <button @click="isShowFun">点击事件</button>
    </div>
    <transition name="fade">
      <p v-if="isShow">666出来了</p>
    </transition>
  </div>
</template>
<script>
export default {
  data() {
    return{
      isShow: false
    }
  },
  methods: {
    isShowFun() {
      this.isShow = !this.isShow
    }
  }
}
</script>
<style>
.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
</style>